package com.test.common.form.perf;

import lombok.Data;

@Data
public class TaskSearchForm {

	private int pageSize = 10;
	private int pageNo = 1;

	private int taskId = -1;
	private String taskName;
	private String creator;

	public int type() {
		if ((this.taskName == null || this.taskName.trim().equals("")) && (this.creator == null || this.creator.trim().equals("")))
			return 0;
		if (this.taskName == null || this.taskName.trim().equals(""))
			return 1;
		if (this.creator == null || this.creator.trim().equals(""))
			return 2;
		return 3;
	}
}
